package com.jsj.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component

public class ProblemSubmissionVo {
    /**
     * 题目提交id
     */
    private long id;

    /**
     * 提交时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date createTime;

    /**
     * 长度
     */
    private int length;

    /**
     * 文件位置
     */
    private String location;

    /**
     * 提交学生用户名
     */
    private String sourceUserName;

    /**
     * 提交学生
     */
    private String sourceNickName;

    /**
     * 对比者用户名
     */
    private String targetUserName;

    /**
     * 对比者
     */
    private String targetNickName;

    /**
     * 相似度
     */
    private byte similarity;

    public ProblemSubmissionVo() {
    }

    public ProblemSubmissionVo(long id, Date createTime, int length, String location, String sourceUserName, String sourceNickName, String targetUserName, String targetNickName, byte similarity) {
        this.id = id;
        this.createTime = createTime;
        this.length = length;
        this.location = location;
        this.sourceUserName = sourceUserName;
        this.sourceNickName = sourceNickName;
        this.targetUserName = targetUserName;
        this.targetNickName = targetNickName;
        this.similarity = similarity;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public int getLength() {
        return length;
    }

    public void setLength(int length) {
        this.length = length;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getSourceUserName() {
        return sourceUserName;
    }

    public void setSourceUserName(String sourceUserName) {
        this.sourceUserName = sourceUserName;
    }

    public String getSourceNickName() {
        return sourceNickName;
    }

    public void setSourceNickName(String sourceNickName) {
        this.sourceNickName = sourceNickName;
    }

    public String getTargetUserName() {
        return targetUserName;
    }

    public void setTargetUserName(String targetUserName) {
        this.targetUserName = targetUserName;
    }

    public String getTargetNickName() {
        return targetNickName;
    }

    public void setTargetNickName(String targetNickName) {
        this.targetNickName = targetNickName;
    }

    public byte getSimilarity() {
        return similarity;
    }

    public void setSimilarity(byte similarity) {
        this.similarity = similarity;
    }

    @Override
    public String toString() {
        return "ProblemSubmissionVo{" +
                "id=" + id +
                ", createTime=" + createTime +
                ", length=" + length +
                ", location='" + location + '\'' +
                ", sourceUserName='" + sourceUserName + '\'' +
                ", sourceNickName='" + sourceNickName + '\'' +
                ", targetUserName='" + targetUserName + '\'' +
                ", targetNickName='" + targetNickName + '\'' +
                ", similarity=" + similarity +
                '}';
    }
}
